<?php
namespace Swiftx\Bundle\WeChat\Interfaces\Controller\Mall;
use Swiftx\Interfaces\Httpd\Request;
use Swiftx\Interfaces\Httpd\Response;

/**
 * 用户登录页面接口
 * @default-implement Swiftx\Bundle\WeChat\Controller\Mall\Goods singleton=true
 * @router-annotation Swiftx\Component\Router\Annotation\Method
 */
interface Goods {

    /**
     * 新增商品记录
     * @param Request   $request
     * @param Response  $response
     * @router method   post
     * @return bool
     */
    public function create(Request $request, Response $response):bool;

    /**
     * 显示商品列表
     * @param Request   $request
     * @param Response  $response
     * @router method   get
     * @return bool
     */
    public function ajaxList(Request $request, Response $response):bool;

    /**
     * 显示商品详情
     * @param Request   $request
     * @param Response  $response
     * @router method   get
     * @return bool
     */
    public function ajaxDetail(Request $request, Response $response):bool;

    /**
     * 显示商品详情
     * @param Request   $request
     * @param Response  $response
     * @router method   get
     * @return bool
     */
    public function ajaxBuy(Request $request, Response $response):bool;

}